<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>

<body>

</body>
<script type="text/javascript">
    // 判断一个整数，属于哪个范围：大于0；小于0；等于0
    var number = Number(prompt('输入数字:'));
    if (number > 0) {
        console.log('大于0');
    } else if (number < 0) {
        console.log('小于0')
    } else if(number == 0) {
        console.log('=0')
    }else{
        console.log('非法输入，小心查水表')
    }
</script>

</html>